//
//  HeightForText.m
//  HomeWork_UI_数据库
//
//  Created by dllo on 15/7/10.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "HeightForText.h"

@implementation HeightForText


+ (CGFloat)heightForText:(NSString *)text width:(CGFloat)width font:(CGFloat)font
{
    
    CGRect rect = [text boundingRectWithSize:CGSizeMake(width, 3000) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:font]} context:nil];
    
    return rect.size.height;
    
}

@end
